Merge pull request #1086 from QED-it/fixes_to_leave_asset_base_out_of… #36
This file contains hidden or 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 Rendered Site | |
on: | |
push: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment, skipping runs queued between the run | |
# in-progress and latest queued. However, do NOT cancel in-progress runs as we | |
# want to allow these production deployments to complete. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
render-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
with: | |
ref: publish | |
fetch-depth: 0 | |
ssh-key: ${{ secrets.DEPLOY_KEY }} | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Merge `main` to the `publish` branch | |
run: | | |
set -x | |
git config --global user.name 'github_actions' | |
git config --global user.email '[email protected]' | |
git config --global --add safe.directory /github/workspace | |
git merge origin/main --commit -m 'Auto-deploy: merging "main" branch' | |
- name: Set base ref | |
run: | | |
git show --format=%H --no-notes --no-patch origin/main -- |tee base_ref | |
if ! ( grep -E '^[0-9a-f]{40}$' base_ref ); then exit 1; fi | |
- name: Compile ZIPs and Zcash Protocol Specification | |
uses: ./.github/actions/render | |
- name: Commit and push to `publish` branch | |
uses: EndBug/[email protected] | |
with: | |
add: 'rendered' | |
default_author: github_actions | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: 'rendered' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |