Skip to content

m2x07 is learning Github Actions #7

m2x07 is learning Github Actions

m2x07 is learning Github Actions #7

name: build
run-name: ${{ github.actor }} is learning Github Actions
on: [push, workflow_dispatch]
permissions: write-all
jobs:
deploy-to-github-pages:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v3
- name: setup nodejs
uses: actions/setup-node@v3
with:
node-version: 20
- name: install dependencies
run: npm ci
- name: configure git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name '${{github.repository_owner}}'
git config --global user.email '${{github.repository_owner}}@users.noreply.github.com'
git remote remove origin
git remote add origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
- name: deploy to github pages
run: |
npm run build
npm run deploy