Skip to content

Update chapter_1.md #80

Update chapter_1.md

Update chapter_1.md #80

Workflow file for this run

name: Deploy website
on: [push]
jobs:
# Build website and artifact
build:
runs-on: ubuntu-22.04
name: "Deploy website"
steps:
- name: checkout course_GEO4-4436
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: action
environment-file: environment/workflow/action.yaml
python-version: 3.11
auto-activate-base: false
auto-update-conda: false
channels: conda-forge
- name: Configure
shell: bash -l {0}
run: |
mkdir build
cmake \
-S . \
-B build
- name: Build html
shell: bash
run: |
cmake --build build
# see: https://github.com/actions/upload-pages-artifact
- name: Archive artifact
shell: bash -l {0}
run: |
tar \
--dereference --hard-dereference \
--directory "build/course/_build/html/" \
-cvf "$RUNNER_TEMP/artifact.tar" \
.
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: github-pages
path: ${{ runner.temp }}/artifact.tar
retention-days: 1
if-no-files-found: error
# see: https://github.com/actions/deploy-pages
deploy:
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2 # or the latest "vX.X.X" version tag for this action