This repository has been archived by the owner on Feb 6, 2024. It is now read-only.
Pre Deploy #142
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
# Simple workflow for deploying static content to GitHub Pages | |
name: Pre Deploy | |
on: | |
# Runs on pushes targeting the default branch | |
push: | |
branches: ["main"] | |
schedule: | |
- cron: "0 */6 * * *" | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: write-all | |
jobs: | |
# Single deploy job since we're just deploying | |
pre-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Environment | |
- name: Setup Py 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Set Up Node.js 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install Prettier | |
run: npm i -g prettier | |
# Pre deploy | |
- name: Run pre-deploy.sh | |
run: sh scripts/pre_deploy.sh | |
- name: Format with Prettier | |
run: prettier -c -w . | |
- name: Commit changes | |
run: | | |
git config user.name github-actions[bot] | |
git config user.email github-actions[bot]@users.noreply.github.com | |
git commit -m "pre deploy" -a || exit 0 | |
git push |