Build #441
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: Build | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "0 */3 * * *" | |
jobs: | |
build: | |
strategy: | |
matrix: | |
node-version: [20.10.0] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "${{ matrix.node-version }}" | |
- name: Install | |
run: npm ci | |
- name: Setup environment | |
run: gpg --quiet --batch --yes --decrypt --passphrase="$PASSPHRASE" --output calendar-service-account.json calendar-service-account.json.gpg | |
env: | |
PASSPHRASE: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_PASSPHRASE }} | |
- name: Get events from Google API | |
run: npm run getEvents | |
- name: Build | |
run: npm run build | |
- name: Add CNAME in dist folder | |
run: cp CNAME dist | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.ACCESS_TOKEN }} | |
publish_dir: dist | |
if: github.event_name != 'pull_request' |