Skip to content

publish-docs

publish-docs #299

Workflow file for this run

name: publish-docs
on:
push:
branches: [ main ]
schedule:
- cron: "0 0 * * 0"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
- name: Build
run: hugo --minify --cleanDestinationDir
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Update search index
continue-on-error: true
run: |
python -m pip install --upgrade 'algoliasearch>=2.0,<3.0'
python update-search-index.py
env:
ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }}
ALGOLIA_APP_ID: "5IDMO489J3"
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
exclude_assets: '.github,algolia.json'
force_orphan: true
cname: docs.mysurvey.solutions