legio-30/.github/workflows/website.yml

55 lines
1.5 KiB
YAML
Raw Normal View History

2023-12-04 22:42:56 -05:00
name: Build Website
run-name: Build Website
on:
push:
jobs:
build:
name: Build NPM Project
runs-on: ubuntu-latest
container: node
steps:
- name: Clone Repository
uses: ztimson/actions/clone@develop
- name: Install Dependencies
run: npm i
- name: Build Project
run: npm run build
- name: Upload Artifacts
if: ${{inputs.artifacts}} != "false"
uses: actions/upload-artifact@v3
with:
name: website
path: dist
retention-days: 7
2023-12-04 23:20:14 -05:00
2023-12-04 22:42:56 -05:00
tag:
name: Tag Version
needs: build
runs-on: ubuntu-latest
2023-12-04 23:20:14 -05:00
container: node
2023-12-04 22:42:56 -05:00
steps:
- name: Clone Repository
uses: ztimson/actions/clone@develop
2023-12-04 23:16:20 -05:00
- name: Get Version Number
run: echo "VERSION=$(cat package.json | grep version | grep -Eo ':.+' | grep -Eo '[[:alnum:]\.\/\-]+')" >> $GITHUB_ENV
2023-12-04 22:42:56 -05:00
- name: Tag Version
uses: ztimson/actions/tag@develop
2023-12-04 23:16:20 -05:00
with:
tag: ${{env.VERSION}}
2023-12-04 22:42:56 -05:00
publish:
name: Build & Push Dockerfile
needs: build
uses: ztimson/actions/.github/workflows/docker.yaml@develop
with:
2023-12-04 23:16:20 -05:00
name: ztimson/legio-30
2023-12-04 22:42:56 -05:00
repository: ${{github.server_url}}/${{github.repository}}.git
pass: ${{secrets.DEPLOY_TOKEN}}