-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23d90ce
commit 4a7ef13
Showing
1 changed file
with
5 additions
and
31 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,38 +5,12 @@ on: | |
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'"}}' | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GH_MACHINE_TOKEN }} | ||
publish_dir: .output/public |