Update .github/workflows/website.yaml
All checks were successful
Build Website / Build NPM Project (push) Successful in 18s
Build Website / Tag Version (push) Successful in 4s
Build Website / Build & Push Dockerfile (push) Successful in 45s

This commit is contained in:
Zakary Timson 2023-12-20 04:14:43 +00:00
parent 35d9127abf
commit e752aca61f

View File

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