Demo deployment #11831
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: Demo deployment | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| push: | |
| branches: | |
| - dev | |
| - master | |
| permissions: | |
| contents: read | |
| env: | |
| NODE_OPTIONS: --max_old_space_size=6144 | |
| jobs: | |
| deploy_dev: | |
| runs-on: ubuntu-latest | |
| name: Demo Development | |
| if: github.event_name != 'push' || github.ref_name != 'master' | |
| environment: | |
| name: Demo Development | |
| url: ${{ steps.deploy.outputs.unique_deploy_url }} | |
| steps: | |
| - name: Check out files from GitHub | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| ref: dev | |
| persist-credentials: false | |
| - name: Setup Node and install | |
| uses: ./.github/actions/setup | |
| - name: Build Demo | |
| uses: ./.github/actions/build | |
| with: | |
| target: build-demo | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Deploy to Netlify | |
| id: deploy | |
| uses: ./.github/actions/netlify-deploy | |
| with: | |
| dir: demo/dist | |
| auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
| site-id: ${{ secrets.NETLIFY_DEMO_DEV_SITE_ID }} | |
| deploy_master: | |
| runs-on: ubuntu-latest | |
| name: Demo Production | |
| if: github.event_name == 'push' && github.ref_name == 'master' | |
| environment: | |
| name: Demo Production | |
| url: ${{ steps.deploy.outputs.netlify_url }} | |
| steps: | |
| - name: Check out files from GitHub | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| ref: master | |
| persist-credentials: false | |
| - name: Setup Node and install | |
| uses: ./.github/actions/setup | |
| - name: Build Demo | |
| uses: ./.github/actions/build | |
| with: | |
| target: build-demo | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Deploy to Netlify | |
| id: deploy | |
| uses: ./.github/actions/netlify-deploy | |
| with: | |
| dir: demo/dist | |
| auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
| site-id: ${{ secrets.NETLIFY_DEMO_SITE_ID }} |