Create murasame_short.yml #45
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
# .github/workflows/deploy.yml | |
name: Deploy presets.json | |
on: | |
push: | |
branches: [main] | |
permissions: | |
contents: write | |
pull-requests: write | |
issues: read | |
packages: none | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: main | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- name: Enable corepack | |
run: corepack enable | |
- name: Activate latest Yarn | |
run: yarn set version stable | |
- name: Install dependencies | |
run: yarn install | |
- name: Build presets.json | |
run: yarn build | |
- name: Commit presets.json | |
run: | | |
rm .gitignore | |
git checkout --orphan preset | |
git rm -rf presets | |
git rm -rf index.js | |
git rm -rf package.json | |
git rm -rf README.md | |
git rm -rf .github/workflows | |
git rm -rf .gitignore | |
git add presets.json | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git commit -m "Deploy $GITHUB_SHA" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GH_TOKEN }} | |
branch: preset | |
force: true |