flashcard-archive/.github/workflows/publish.yml

40 lines
1.1 KiB
YAML
Raw Normal View History

2021-12-07 20:39:14 +01:00
name: Deploy site
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
doc-deploy:
runs-on: ubuntu-latest
steps:
2022-03-16 01:58:38 +01:00
- uses: actions/checkout@v3
2021-12-07 20:39:14 +01:00
with:
persist-credentials: false
# to get README.md to webpage as well as GitHub's UI
- name: Pre-generation of directory listing
run: cp README.md files/README.md
- name: Github Pages Directory Listing
uses: jayanta525/github-pages-directory-listing@main
with:
FOLDER: files
2021-12-07 20:39:14 +01:00
# these shouldn't be in apindex, but need to be in repo root for GitHub Pages
- name: Pre-generation of directory listing
2021-12-07 20:39:14 +01:00
run: |
mkdir public
cp -r files/* public
cp CNAME public
2022-03-16 01:58:38 +01:00
touch public/.nojekyll
2021-12-07 20:39:14 +01:00
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.4.1
2021-12-07 20:39:14 +01:00
with:
branch: gh-pages # The branch the action should deploy to.
folder: public # The folder the action should deploy.
clean: true # Automatically remove deleted files from the deploy branchimage: ubuntu:bionic