47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
# .gitea/workflows/build.yaml
|
|
name: Build Workflow
|
|
run-name: ${{ github.actor }} is testing out Gitea Actions 🚀
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [main]
|
|
path-ignore:
|
|
- '.gitea/workflows/*'
|
|
|
|
jobs:
|
|
Build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v3
|
|
- name: Install NodeJS
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '18'
|
|
- name: Install Dependencies
|
|
run: npm ci
|
|
- name: Run Tests
|
|
run: npm test
|
|
Deploy:
|
|
runs-on: ubuntu-latest
|
|
needs: Build
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v3
|
|
- name: Install NodeJS
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '18'
|
|
- name: Install Dependencies
|
|
run: npm ci
|
|
- name: Build
|
|
run: npm run build
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: distfiles
|
|
path: dist/
|
|
- name: Deploy
|
|
run: |
|
|
echo Deploying...
|
|
echo DONE! |