Update to Julia 1.10 + housekeeping #284
Workflow file for this run
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: "Build the website for deployment" | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
name: "Build the material" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout action" | |
uses: actions/checkout@v3.3.0 | |
- name: "Setup julia" | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: '1.10' | |
- name: "Build the core packages" | |
uses: julia-actions/julia-buildpkg@v1 | |
env: | |
GKSwstype: "100" | |
- name: "Build the content" | |
run: julia --project builder.jl | |
env: | |
GKSwstype: "100" | |
- name: "Word count in the build folder" | |
id: word-count | |
if: github.event_name == 'pull_request' | |
run: echo "::set-output name=count::Current word count is $(wc -w `find dist/content/ -type f` | tail -n 1 | cut -d' ' -f2)" | |
- name: "Comment on wordcount" | |
uses: thollander/actions-comment-pull-request@v1 | |
if: github.event_name == 'pull_request' | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
message: ${{ steps.word-count.outputs.count }} | |
- name: Upload results | |
uses: actions/upload-artifact@v3 | |
continue-on-error: true | |
with: | |
name: built-project | |
path: dist | |
website: | |
runs-on: ubuntu-latest | |
needs: build | |
name: "Make the website" | |
steps: | |
- name: "Checkout action" | |
uses: actions/checkout@v3.3.0 | |
- name: "Setup hugo" | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: "0.127.0" | |
extended: true | |
- name: Download built lessons | |
uses: actions/download-artifact@v3 | |
with: | |
name: built-project | |
path: dist | |
- name: "Run hugo" | |
run: | | |
cd dist; | |
hugo --minify | |
- name: Deploy the website | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.event_name == 'push' | |
with: | |
github_token: ${{ secrets.ACCESS_TOKEN }} | |
publish_dir: "./dist/public" | |
force_orphan: true |