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

41 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
submodules: recursive
fetch-depth: 0
2021-12-07 20:39:14 +01:00
- name: Install apindex-v2
run: |
sudo apt-get update
sudo apt-get install curl git -y
curl https://raw.githubusercontent.com/jayanta525/apindex/master/install.sh | sudo bash
- name: Build site
run: |
2022-02-17 14:48:27 +01:00
cp README.md files/README.md
2021-12-07 20:39:14 +01:00
apindex files
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