Skip to content

Build and Deploy

Build and Deploy #53

Workflow file for this run

name: Build and Deploy
on:
schedule:
- cron: "0 4 * * *"
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
cache-dependency-path: 'mastodon-sitemap.py'
- name: Install Deps
run: pip3 install argparse Mastodon.py sitemap_python
- name: Build
run: |
python3 mastodon-sitemap.py --instance https://swissodon.ch \
--access-token ${{ secrets.ACCESS_TOKEN }} \
--max-urls 500 \
--overwrite \
./dist/sitemap.xml
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
BRANCH: gh-pages
FOLDER: dist