Skip to content

Merge pull request #293 from toy/fix-duplicate-history #788

Merge pull request #293 from toy/fix-duplicate-history

Merge pull request #293 from toy/fix-duplicate-history #788

Workflow file for this run

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
push:
branches:
- main
- 'release/**'
pull_request:
branches:
- main
- 'release/**'
permissions:
contents: write
pages: write
id-token: write
pull-requests: write
issues: write
statuses: read
jobs:
nodejs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- name: Install packages
run: yarn --frozen-lockfile
- name: Run Setup
run: node make.js setup
- name: Run build
run: yarn build
- name: Lint
run: yarn lint
- name: Deploy to NPM
if: github.repository_owner == 'Authress-Engineering' && github.ref != 'refs/heads/main' && github.event_name == 'push'
run: |
npm install -g npm@latest
npm publish
- name: After build
if: github.repository_owner == 'Authress-Engineering' && github.ref != 'refs/heads/main' && github.event_name == 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node make.js after_build
- name: Create Github Release and Tag
if: github.repository_owner == 'Authress-Engineering' && github.ref != 'refs/heads/main' && github.event_name == 'push'
run: |
git tag ${GITHUB_REF/refs\/heads\/release\//}.$GITHUB_RUN_NUMBER
git push origin ${GITHUB_REF/refs\/heads\/release\//}.$GITHUB_RUN_NUMBER
deploy:
if: github.repository_owner == 'Authress-Engineering' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4