publish-packages #3
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: Publish | |
| # Rebuilds and deploys the whole package site. Fired by each project's release | |
| # workflow via repository_dispatch once its packages are on the GitHub release; | |
| # can also be run by hand from the Actions tab (e.g. after changing scripts or | |
| # rotating keys). | |
| on: | |
| repository_dispatch: | |
| types: [publish-packages] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Serialize publishes; a burst of dispatches from simultaneous releases just | |
| # queues, and every run rebuilds the full site anyway. | |
| concurrency: | |
| group: pages | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install repo tooling | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y reprepro createrepo-c | |
| - name: Import signing keys | |
| env: | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| APK_PRIVATE_KEY: ${{ secrets.APK_PRIVATE_KEY }} | |
| run: | | |
| printf '%s\n' "$GPG_PRIVATE_KEY" | gpg --batch --import | |
| install -m 600 /dev/null [email protected] | |
| printf '%s\n' "$APK_PRIVATE_KEY" >> [email protected] | |
| - name: Build site | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| BASE_URL: https://packages.shellcell.dev | |
| run: ./scripts/build-site.sh | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: site | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |