test 10 #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: | |
- test/docs | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Setup Pages | |
uses: actions/configure-pages@v2 | |
- name: Build mdBook | |
run: forge doc --build | |
# cd docs | |
# git worktree add gh-pages | |
# git config user.name "Deploy from CI" | |
# git config user.email "" | |
# cd gh-pages | |
# # Delete the ref to avoid keeping history. | |
# git update-ref -d refs/heads/gh-pages | |
# rm -rf * | |
# mv ../book/* . | |
# git add . | |
# git commit -m "Deploy $GITHUB_SHA to gh-pages" | |
# git push --force --set-upstream origin gh-pages | |
- name: Upload Artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ./docs/book | |
name: github-pages | |
retention-days: 1 | |
# - name: Deploy to Github Pages | |
# uses: | |
# with: | |
# emit_telemetry: false | |
# token: *** | |
# timeout: 600000 | |
# error_count: 10 | |
# reporting_interval: 5000 | |
# artifact_name: github-pages | |
# preview: false | |
deploy: | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 | |
# deploy: | |
# runs-on: ubuntu-latest | |
# if: github.ref == 'refs/heads/gh-pages' | |
# permissions: | |
# pages: write | |
# id-token: write | |
# environment: | |
# name: github-pages | |
# url: ${{ steps.deployment.outputs.page_url }} | |
# needs: build | |
# steps: | |
# - name: Deploy to GitHub Pages | |
# id: deployment | |
# uses: actions/deploy-pages@v1 |