ci: debug 2 electric boogaloo #25
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: Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python π | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Install Pre-Commit β οΈ | |
run: python -m pip install pre-commit && pre-commit install | |
- name: Load cached Pre-Commit Dependencies π¦ | |
id: cached-pre-commit-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pre-commit/ | |
key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Execute Pre-Commit π | |
run: pre-commit run --show-diff-on-failure --color=always --all-files | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
needs: validate | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Setup Node.js π¨ | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install dependencies π¦ | |
run: npm install | |
- name: Configure Git π οΈ | |
run: | | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "[email protected]" | |
- name: debug π | |
run: ls -alh | |
- name: Deploy to GitHub Pages π | |
if: github.ref == 'refs/heads/main' | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: dist | |
token: ${{ secrets.GITHUB_TOKEN }} |