Skip to content

Publish web docs

Publish web docs #33

Workflow file for this run

#
# https://quarto.org/docs/publishing/github-pages.html#publish-action
#
on:
workflow_dispatch:
#push:
# branches: main
name: Publish web docs
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
# Because index.yaml is not part of the documentation
# We need to get the latest version from gh-pages
# And copy it to the docs/www folder.
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: 'gh-pages'
path: 'gh-pages'
- name: Backup index.yaml
run: |
ls gh-pages
ls docs/*
cp gh-pages/index.yaml .
cp gh-pages/install-magasin.sh .
cp gh-pages/uninstall-magasin.sh .
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
path: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout updated gh-pages
uses: actions/checkout@v4
with:
ref: 'gh-pages'
path: 'gh-pages'
- name: Add back the backuped files
run: |
cp index.yaml ./gh-pages/
cp install-magasin.sh ./gh-pages/
cp uninstall-magasin.sh ./gh-pages/
- name: Add security.txt to deployment
run: |
# Create the ./well-known folder
mkdir ./gh-pages/.well-known
# copy security
cp docs/security.txt ./gh-pages/.well-known
- name: "Push the new index"
uses: EndBug/add-and-commit@v9
with:
cwd: './gh-pages/'
message: "add back index.yaml after updating the web"
committer_name: GitHub Actions
committer_email: [email protected]