Update TDF 2.0 task apps to 3.2.1 (#559) #21
This file contains hidden or 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 and Deploy (CloudFlare) | |
| on: | |
| push: | |
| branches: ['main'] | |
| workflow_dispatch: | |
| env: | |
| GOOGLE_ANALYTICS_TRACKING_ID: ${{ secrets.GOOGLE_TAGMANAGER_ID_SCDF }} | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| # build and deploy main | |
| build: | |
| name: Build site | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # agent may give node which doesn't work for us | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 18.2.0 | |
| # do site build | |
| - name: Yarn build | |
| env: | |
| NODE_OPTIONS: '--openssl-legacy-provider' | |
| run: | | |
| yarn install | |
| yarn run fix | |
| yarn build | |
| # Publish on CloudFlare | |
| - name: Publish to Cloudflare Pages | |
| id: cloudflare-publish | |
| uses: cloudflare/pages-action@v1 | |
| with: | |
| apiToken: ${{ secrets.CF_API_TOKEN }} | |
| accountId: ${{ secrets.CF_ACCOUNT_ID }} | |
| projectName: ${{ secrets.CF_PROJECT_NAME }} | |
| directory: public |