Update 2024-Workshop.md #58
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
# | |
# GitHub Actions Workflow to build and deploy CF Website. | |
# | |
# For more information on the actions used in this workflow, please see: | |
# https://github.com/actions/checkout | |
# https://github.com/marketplace/actions/build-jekyll | |
# https://github.com/actions/deploy-pages | |
# | |
name: Build and Deploy CF Website | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
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: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# - name: Setup Pages | |
# uses: actions/configure-pages@v5 | |
- name: Build with Jekyll | |
uses: actions/jekyll-build-pages@v1 | |
with: | |
source: ./ | |
destination: ./_site | |
# - name: Touch .nojekyll | |
# run: | | |
# sudo touch _site/.nojekyll | |
# sudo chmod -R a+rX _site | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: _site # The folder the action should deploy. | |
branch: gh-pages # The branch to deploy to | |
clean: true | |
clean-exclude: | | |
.nojekyll | |
# - name: Upload artifact | |
# uses: actions/upload-pages-artifact@v3 | |
# with: | |
# path: ./_site | |
# | |
# deploy: | |
# runs-on: ubuntu-latest | |
# needs: build | |
# steps: | |
# - name: Deploy to GitHub Pages | |
# id: deployment | |
# uses: actions/deploy-pages@v4 | |
# environment: | |
# name: github-pages | |
# url: ${{ steps.deployment.outputs.page_url }} | |