Publish Package #78
This file contains 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 Package | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "*/30 * * * *" | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
env: | |
BUILD_PATH: docs | |
permissions: | |
pages: write | |
issues: write | |
contents: write | |
packages: write | |
pull-requests: write | |
id-token: write | |
jobs: | |
npm-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://npm.pkg.github.com' | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run build -w @awesome-algorand/core-fetch | |
- run: node ./bin/publisher.js | |
env: | |
NPM_CONFIG_REGISTRY: 'https://npm.pkg.github.com' | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Commit | |
run: | | |
git commit -am "π Release ${{ github.sha }}" | |
git push | |
- name: Build with Astro | |
run: npm run build | |
working-directory: ${{ env.BUILD_PATH }} | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ${{ env.BUILD_PATH }}/dist | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
needs: npm-publish | |
runs-on: ubuntu-latest | |
name: Deploy | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |