-
Notifications
You must be signed in to change notification settings - Fork 42
38 lines (36 loc) 路 1.16 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: "build-test"
on:
push:
pull_request:
permissions:
statuses: write
deployments: write
pull-requests: write
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/checkout@v4
- run: npm ci
- run: npm run all
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Create a simple Web site
run: mkdir -p deploy_dist && echo -e "<pre>$(date -u)\n$GITHUB_SHA\n$GITHUB_REF</pre>" > deploy_dist/index.html
- uses: ./
id: deploy-to-netlify
with:
publish-dir: './deploy_dist'
production-branch: master
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
functions-dir: './functions-test'
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
- run: "echo 'outputs.deploy-url: ${{ steps.deploy-to-netlify.outputs.deploy-url }}'"