diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 8661869..da9f0e5 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -2,18 +2,30 @@ name: github pages on: push: - branches: - - master + tags: + - '*' jobs: deploy: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 + + - name: Cache cargo registry + uses: actions/cache@v1 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + + - name: Cache cargo index + uses: actions/cache@v1 + with: + path: ~/.cargo/git + key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} - name: Build mdbook - run: cargo install mdbook - + run: cargo install mdbook + - name: Build run: mdbook build