getting fragments from frontend should be language-aware #436
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
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build_css: | |
| runs-on: ubuntu-latest | |
| env: | |
| source: public/dist/assets | |
| destination: assets/website-2021/ | |
| steps: | |
| - name: Checkout source Git branch | |
| uses: actions/checkout@v5 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: '16' | |
| - name: Install npm modules | |
| run: npm install | |
| - name: compile assets | |
| run: npm run build | |
| - name: Upload to cdn.w3.org bucket | |
| if: success() | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_REGION: 'us-east-1' | |
| run: | |
| aws s3 sync --no-progress ${{ env.source }} s3://cdn.w3.org/${{ env.destination }} | |
| - name: Purge cache for www.w3.org | |
| if: success() | |
| run: | | |
| curl -s --max-time 20 -X POST "https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_ZONE }}/purge_cache" \ | |
| -H "Authorization: Bearer ${{ secrets.CLOUDFLARE_CACHEPURGE_TOKEN }}" \ | |
| -H "Content-Type: application/json" \ | |
| --data "{\"prefixes\":[\"www.w3.org/${{ env.destination }}\"]}" |