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

43 lines
1.2 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
submodules: recursive
fetch-depth: 1
2021-12-07 20:39:14 +01:00
# 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@v3.0.0
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@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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