docs/.github/workflows/publish.yml

33 lines
995 B
YAML
Raw Permalink Normal View History

2022-01-01 10:31:18 +05:30
name: Documentation
on: push
jobs:
build:
2022-01-09 16:16:38 +05:30
runs-on: ubuntu-18.04
2022-01-01 10:31:18 +05:30
steps:
2022-01-09 16:16:38 +05:30
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Install Zola
run: ./scripts/ci.sh install
- name: Build production website
run: ./scripts/ci.sh build
- name: Deploy to gh-pages 🚀
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: JamesIves/github-pages-deploy-action@v4.6.4
2022-01-09 16:16:38 +05:30
with:
branch: gh-pages
token: ${{ secrets.GITHUB_TOKEN }}
folder: ./public
- name: deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'forgeflux-org/docs' }}
2022-01-09 16:16:38 +05:30
run: >-
curl --location --request POST "https://deploy.batsense.net/api/v1/update" --header 'Content-Type: application/json' --data-raw "{ \"secret\": \"${{ secrets.DEPLOY_TOKEN }}\", \"branch\": \"gh-pages\" }"