Skip to content

v0.0.2-RC3

v0.0.2-RC3 #4

Workflow file for this run

name: Generate and publish
on:
release:
types:
- created
env:
TAG_NAME: ${{ github.event.release.tag_name }}
REPOSITORY_NAME: auth-playground
GH_USERNAME: m-mattia-m-machine
GH_EMAIL: [email protected]
DOMAIN: auth-playground.makefermion.com
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Clean-install npm dependencies
run: npm ci
- name: Generate nuxt files
run: npm run generate
# - name: Add & Commit
# uses: EndBug/[email protected]
- name: Set git config
run: |
echo "Usernmae: $GH_USERNAME"
echo "Usernmae: $GH_EMAIL"
git config --global user.name '$GH_USERNAME'
git config --global user.email '$GH_EMAIL'
- name: Publish
run: npm run deploy
- name: Update GitHub Pages settings
env:
GH_MACHINE_TOKEN: ${{ secrets.GH_MACHINE_TOKEN }}
run: |
curl -X PATCH \
-H "Authorization: token GH_MACHINE_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/$REPOSITORY_NAME \
-d '{"name": "'$REPOSITORY_NAME'", "has_pages": true, "pages": {"cname": "'$DOMAIN'"}}'