From 1569fc4f017513a46518b34874f3ea7664e18e36 Mon Sep 17 00:00:00 2001 From: jiro4989 Date: Sun, 8 Mar 2020 22:08:15 +0900 Subject: [PATCH] Merge docs workflow to main workflow #37 --- .github/workflows/docs.yml | 29 ------------------------ .github/workflows/main.yml | 45 +++++++++++++++++++++++--------------- 2 files changed, 27 insertions(+), 47 deletions(-) delete mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 76fe46b..0000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: docs - -on: - push: - branches: - - master - -jobs: - build-docs-deploy: - env: - NIM_VERSION: 1.0.4 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Cache choosenim - id: cache-choosenim - uses: actions/cache@v1 - with: - path: ~/.choosenim - key: ${{ runner.os }}-choosenim-${{ env.NIM_VERSION }} - - uses: jiro4989/setup-nim-action@v1.0.1 - - name: Generate documents - run: nimble docs - - name: Deploy - uses: peaceiris/actions-gh-pages@v2.4.0 - env: - ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} - PUBLISH_BRANCH: gh-pages - PUBLISH_DIR: ./docs diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8dac577..ab30903 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,6 +2,9 @@ name: build on: [push, pull_request] +env: + NIM_VERSION: 1.0.6 + jobs: skip: runs-on: ubuntu-latest @@ -17,25 +20,31 @@ jobs: build: runs-on: ubuntu-latest needs: before - env: - NIM_VERSION: 1.0.4 steps: - - uses: actions/checkout@v1 - - name: Cache choosenim - id: cache-choosenim - uses: actions/cache@v1 - with: - path: ~/.choosenim - key: ${{ runner.os }}-choosenim-${{ env.NIM_VERSION }} - - name: Cache nimble - id: cache-nimble - uses: actions/cache@v1 - with: - path: ~/.nimble - key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }} - - uses: jiro4989/setup-nim-action@v1.0.1 - - run: nimble build -Y - - run: nimble test -Y + - uses: actions/checkout@v1 + - name: Cache choosenim + id: cache-choosenim + uses: actions/cache@v1 + with: + path: ~/.choosenim + key: ${{ runner.os }}-choosenim-${{ env.NIM_VERSION }} + - name: Cache nimble + id: cache-nimble + uses: actions/cache@v1 + with: + path: ~/.nimble + key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }} + - uses: jiro4989/setup-nim-action@v1.0.1 + - run: nimble build -Y + - run: nimble test -Y + - run: nimble docs + - name: Deploy documents + uses: peaceiris/actions-gh-pages@v2.4.0 + env: + ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} + PUBLISH_BRANCH: gh-pages + PUBLISH_DIR: ./docs + if: github.ref == 'refs/heads/master' create-tag-draft: runs-on: ubuntu-latest