39 lines
927 B
YAML
39 lines
927 B
YAML
# .gitea/workflows/build.yaml
|
|
name: Gitea Actions Demo
|
|
run-name: ${{ github.actor }} is testing out Gitea Actions 🚀
|
|
on: [workflow_dispatch, push]
|
|
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: Build
|
|
run: npm build
|
|
- name: Deploy
|
|
run: |
|
|
echo Deploying...
|
|
sleep 1
|
|
echo ...
|
|
sleep 1
|
|
echo ...
|
|
sleep 1
|
|
echo DONE! |