rh2 spec, thread zigbee #240
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: Deploy to Next | |
| on: | |
| push: | |
| branches: | |
| - main | |
| # https://github.com/ouzi-dev/commit-status-updater/tree/v2/#workflow-permissions | |
| permissions: | |
| contents: read | |
| statuses: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 21 | |
| - name: Cache npm | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Set deployment status | |
| uses: ouzi-dev/commit-status-updater@v2 | |
| with: | |
| name: Deploy | |
| status: pending | |
| description: Preparing deploy | |
| - name: Install | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| env: | |
| PUBLIC_GOOGLE_ANALYTICS: ${{ secrets.NEXT_PUBLIC_GOOGLE_ANALYTICS }} | |
| DEPLOYMENT_NAME: 'Next' | |
| - name: Deploy | |
| if: success() | |
| uses: jakejarvis/[email protected] | |
| with: | |
| args: --delete | |
| env: | |
| AWS_S3_BUCKET: ${{ vars.NEXT_BUCKET_NAME }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.NEXT_KEY }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.NEXT_SECRET }} | |
| AWS_REGION: ${{ vars.NEXT_REGION }} | |
| SOURCE_DIR: .vitepress/dist | |
| - name: Set success deployment status | |
| if: success() | |
| uses: ouzi-dev/commit-status-updater@v2 | |
| with: | |
| name: Deploy | |
| status: success | |
| description: Deploy ready | |
| url: ${{ vars.NEXT_URL }} | |
| - name: Set failed deployment status | |
| if: failure() | |
| uses: ouzi-dev/commit-status-updater@v2 | |
| with: | |
| name: Deploy | |
| status: failure | |
| description: Failed to deploy | |
| - name: Invalidate CloudFront | |
| uses: chetan/invalidate-cloudfront-action@v2 | |
| env: | |
| DISTRIBUTION: ${{ vars.NEXT_DISTRIBUTION }} | |
| PATHS: "/ /*" | |
| AWS_REGION: ${{ vars.NEXT_REGION }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.NEXT_KEY }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.NEXT_SECRET }} |