individual shader #329
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 test page to GitHub Pages | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
workflow_dispatch: | |
inputs: | |
tags: | |
description: 'Run workflow manually' | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Setup Pages | |
uses: actions/configure-pages@v2 | |
- name: Replace current git hash to HTML | |
run: | | |
sed -i 's/{{CURRENT_HASH}}/${{ github.sha }}/g' ./public/index.html | |
sed -i 's/{{CURRENT_HASH}}/${{ github.sha }}/g' ./public/sw.js | |
- name: Build webpack | |
run: | | |
npm install | |
npm run build | |
- name: Upload sourcemap to Sentry | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
with: | |
environment: production | |
version: ${{ github.sha }} | |
sourcemaps: './dist' | |
set_commits: skip | |
ignore_missing: true | |
- name: Copy JavaScript to /public | |
run: cp -rf ./dist/* ./public/ | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: './public' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |