Update tags data #640
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: Update tags data | |
on: | |
schedule: | |
- cron: '0 10 */1 * *' | |
push: | |
branches: | |
- master | |
permissions: | |
contents: write | |
id-token: write | |
pages: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
update_tags_data: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
node-version: 18 | |
- run: npm install | |
- run: npm run build | |
- uses: EndBug/add-and-commit@v9 | |
with: | |
message: 'Update .json files' | |
add: '*.json' | |
remove: '.docs/data/*' | |
cwd: 'docs/data/' | |
pull: '--rebase --autostash' | |
# Build job | |
build: | |
runs-on: ubuntu-latest | |
needs: update_tags_data | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Pages | |
uses: actions/configure-pages@v2 | |
- name: Build with Jekyll | |
uses: actions/jekyll-build-pages@v1 | |
with: | |
source: ./docs | |
destination: ./_site | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
# Deployment job | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |