Rename project and clarify licensing information #155
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: Test & deploy branch to Cloudflare | |
| on: | |
| push: | |
| workflow_dispatch: | |
| inputs: | |
| debug_enabled: | |
| type: boolean | |
| description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)" | |
| required: false | |
| default: false | |
| jobs: | |
| test-and-deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| deployments: write | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - name: Use Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "16" | |
| # Enable tmate debugging of manually-triggered workflows if the input option was provided | |
| - name: Setup tmate session | |
| uses: mxschmitt/action-tmate@v3 | |
| if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
| - name: Build Booyah, and setup for link | |
| run: | | |
| yarn | |
| yarn build | |
| yarn link | |
| working-directory: ./booyah | |
| - name: Build booyah-maquette | |
| run: | | |
| yarn | |
| yarn add maquette | |
| yarn add @play-curious/maquette-advanced-projector | |
| yarn link booyah | |
| yarn build | |
| working-directory: ./booyah-maquette | |
| - name: Install other dependencies | |
| run: yarn | |
| - name: Check types | |
| run: yarn types | |
| - name: Build dist | |
| run: yarn dist | |
| - name: Deploy to Cloudflare | |
| uses: cloudflare/pages-action@v1 | |
| id: deploy | |
| with: | |
| apiToken: ${{ secrets.CF_TOKEN }} | |
| accountId: ${{ secrets.CF_ACCOUNT_ID }} | |
| gitHubToken: ${{ secrets.GH_DEPLOY_TOKEN }} | |
| projectName: cyberharcelement | |
| directory: ./dist/ | |
| - name: Send Discord failure notification | |
| uses: Ilshidur/action-discord@master | |
| if: failure() | |
| env: | |
| DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
| with: | |
| args: "🚨 Deployment failed on branch `${{ github.head_ref || github.ref_name }}`" | |
| - name: Send Discord success notification | |
| uses: Ilshidur/action-discord@master | |
| env: | |
| DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
| with: | |
| args: "You can test the deployment of branch `${{ github.head_ref || github.ref_name }}` at ${{ steps.deploy.outputs.url }}" |