Merge pull request #44 from MarleneJiang/35-20230903-033058 #2
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 JSON Files | |
on: | |
push: | |
branches: | |
- "main" | |
paths: | |
- 'bots.json' | |
- 'adapters.json' | |
- 'plugins.json' | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Create public directory | |
run: mkdir public | |
- name: Compress JSON files with jq | |
run: | | |
jq --compact-output . bots.json > public/bots.json | |
jq --compact-output . adapters.json > public/adapters.json | |
jq --compact-output . plugins.json > public/plugins.json | |
- name: Upload Artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: './public' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |