build-deploy #19
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: Build and Deploy | |
| on: | |
| repository_dispatch: | |
| types: [build-deploy] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| repository: developerschallenges/developerschallenges | |
| submodules: true | |
| token: ${{ secrets.GH_PAT }} | |
| - run: | | |
| sudo timedatectl set-timezone Europe/Stockholm | |
| npm install hexo-cli -g | |
| npm ci | |
| hexo azuresearch | |
| hexo clean | |
| hexo generate | |
| - uses: actions/upload-pages-artifact@v1 | |
| with: | |
| path: public/ | |
| deploy: | |
| needs: build | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/deploy-pages@v1 | |
| id: deployment |