deploy #18
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 | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: 'read' | |
| id-token: 'write' | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: microsoft/pxt | |
| path: pxt | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: microsoft/pxt-common-packages | |
| path: pxt-common-packages | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: install PXT | |
| run: | | |
| cd pxt | |
| npm install | |
| npm run build | |
| - name: install pxt-common-packages | |
| run: | | |
| cd pxt-common-packages | |
| npm install | |
| - name: npm install | |
| run: npm install | |
| - name: link pxt | |
| run: | | |
| rm -Rf node_modules/pxt-core | |
| rm -Rf node_modules/pxt-common-packages | |
| npx pxt link ./pxt | |
| npx pxt link ./pxt-common-packages | |
| npx pxt ci | |
| - id: 'auth' | |
| uses: 'google-github-actions/auth@v2' | |
| with: | |
| workload_identity_provider: 'projects/240743940157/locations/global/workloadIdentityPools/github/providers/pxt-maker' | |
| service_account: 'deploy-service-account@maker-labs-461209.iam.gserviceaccount.com' | |
| - name: 'Set up Cloud SDK' | |
| uses: 'google-github-actions/setup-gcloud@v2' | |
| with: | |
| version: '>= 390.0.0' | |
| - name: deploy | |
| run: | | |
| gcloud app deploy --verbosity=debug |