Bump actions/upload-pages-artifact from 2 to 3 (#23) #23
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: github pages | |
# Execute this workflow only for Pushes to your main branch, not for PRs | |
on: | |
push: | |
branches: | |
- main | |
# Provides the implicitly used and hidden GITHUB_TOKEN the necessary permissions to deploy github_pages | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
# Execute a job called "api-docs" | |
jobs: | |
api-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup nim | |
uses: jiro4989/setup-nim-action@v1 | |
with: | |
nim-version: '2.0.0' | |
- run: nimble install -Y | |
- name: Build your docs | |
run: nimble book | |
- name: Copy files to _site directory | |
run: | | |
mkdir _site | |
cp -r docs/bookCompiled/* _site | |
- name: Upload _site directory for deploy job | |
uses: actions/upload-pages-artifact@v3 # This will automatically upload an artifact from the '/_site' directory | |
# Deploy _site directory with permissions of GITHUB_TOKEN | |
deploy: | |
environment: | |
name: github-pages | |
runs-on: ubuntu-latest | |
needs: api-docs | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |