diff options
author | peaceiris <30958501+peaceiris@users.noreply.github.com> | 2020-01-28 06:37:15 +0300 |
---|---|---|
committer | peaceiris <30958501+peaceiris@users.noreply.github.com> | 2020-01-28 06:37:15 +0300 |
commit | 970af2bb7f819d80e22e68d52512e5742fcb6f8d (patch) | |
tree | 3e3e8356fc19f4e62dc97e6a7b2486601acd21b8 /.github | |
parent | 758bcadb4436c20943d8ea54a310d846280be0e2 (diff) |
feat: Add v0.1.0
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/deploy-github-pages.yml | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/.github/workflows/deploy-github-pages.yml b/.github/workflows/deploy-github-pages.yml new file mode 100644 index 00000000..8ba45ddb --- /dev/null +++ b/.github/workflows/deploy-github-pages.yml @@ -0,0 +1,63 @@ +name: Deploy + +on: + push: + branches: + - master + paths-ignore: + - 'README.md' + schedule: + - cron: "13 13 * * *" + +jobs: + skipci: + runs-on: ubuntu-18.04 + steps: + - run: echo "[Skip CI] ${{ contains(github.event.head_commit.message, '[skip ci]') }}" + + deploy: + runs-on: ubuntu-18.04 + if: contains(github.event.head_commit.message, '[skip ci]') == false + steps: + - uses: actions/checkout@v2 + + - name: Read .env + id: hugo_version + run: | + . ./exampleSite/.env + echo "::set-output name=hugo_version::${HUGO_VERSION}" + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: "${{ steps.hugo_version.outputs.hugo_version }}" + extended: true + + - name: Build + working-directory: ./exampleSite + run: | + make data + hugo --minify --themesDir ../ --layoutDir ../layouts + + - name: Deploy (script mode) + env: + # ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PUBLISH_BRANCH: gh-pages + PUBLISH_DIR: ./exampleSite/public + SCRIPT_MODE: true + run: | + wget https://raw.githubusercontent.com/peaceiris/actions-gh-pages/v2/entrypoint.sh + bash ./entrypoint.sh + + # - name: Deploy + # # uses: peaceiris/actions-gh-pages@v2 + # uses: docker://peaceiris/gh-pages:v2 + # env: + # # ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # PUBLISH_BRANCH: master + # PUBLISH_DIR: ./public + # with: + # emptyCommits: false + # forceOrphan: true |