Build and Deploy #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |