Run the deploy command #249
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: Autodeploy | |
run-name: Run the deploy command | |
on: | |
push: | |
branches: [main] | |
jobs: | |
deployment: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Make script file executable | |
run: chmod +x extract.sh | |
- name: Run the script | |
run: ./extract.sh | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20" | |
- name: Install dependencies | |
run: npm install | |
- name: Format code | |
run: npm run format | |
- name: Configure Git | |
run: | | |
git config --global user.name "${{ github.actor }}" | |
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
- name: Commit and push changes | |
run: | | |
git add . | |
git commit -m "docs: deploy site" | |
git push |