feat: build targets on arm64 macos (#34) #24
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 GitHub Pages | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: 'pages' | |
cancel-in-progress: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
ZOLA_VERSION: 0.19.2 | |
DOC_DIR: doc | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Setup Zola | |
run: | | |
curl -s -L https://github.com/getzola/zola/releases/download/v${{ env.ZOLA_VERSION }}/zola-v${{ env.ZOLA_VERSION }}-x86_64-unknown-linux-gnu.tar.gz | sudo tar xvzf - -C /usr/local/bin | |
shell: bash | |
- name: Build GitHub Pages | |
run: zola --root ${{ env.DOC_DIR }} build | |
- name: Upload artifacts | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./${{ env.DOC_DIR }}/public | |
deploy: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
needs: build | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |