Merge pull request #9 from LiangLuDev/app-wall/6467128147 #59
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 Homepage | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'homepage/**' | |
| - 'apps/asc-web/**' | |
| workflow_dispatch: | |
| workflow_run: | |
| workflows: ["Update Apps Data"] | |
| types: [completed] | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Build i18n pages | |
| run: node homepage/build-i18n.js | |
| - name: Copy web apps to homepage | |
| run: | | |
| cp -r apps/asc-web/console homepage/console | |
| cp -r apps/asc-web/command-center homepage/command-center | |
| cp -r apps/asc-web/shared homepage/shared | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: homepage | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/deploy-pages@v4 | |
| id: deployment |