Format website code #2
Workflow file for this run
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: Format and Commit Code | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' # You can change this to your required Node.js version | |
- name: Change Directory and Run NPM Install | |
working-directory: website | |
run: | | |
npm install | |
npm run format | |
- name: Commit and Push Changes | |
run: | | |
git config --global user.name 'Loculus bot' | |
git config --global user.email 'bot@loculus.org' | |
git add -A | |
git commit -m "Automated code formatting" || echo "No changes to commit" | |
git push |