Pre Deploy #657
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: Pre Deploy | |
on: | |
push: | |
branches: ['main'] | |
schedule: | |
- cron: '0 8 * * *' | |
workflow_dispatch: | |
permissions: write-all | |
jobs: | |
pre-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Environment | |
- name: Setup PDM | |
uses: pdm-project/setup-pdm@v3 | |
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: Install Dependencies | |
run: pdm install -G:all | |
- name: Run pre-deploy.sh | |
run: pdm 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 add . | |
git commit -m "pre deploy" || exit 0 | |
git push |