-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (50 loc) · 1.76 KB
/
node.js.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Add Node.js
uses: actions/setup-node@v1
with:
node-version: 16.x
- run: npm i
- run: npm run build
- name: Deploy
uses: manzoorwanijk/action-deploy-to-repo@master
with:
src_dir: build
target_owner: noahbjohnson
target_repo: noahbjohnson.github.io
target_dir: ''
target_branch: master # default
# Optional
access_token: ${{ secrets.GITHUB_TOKEN }}
cleanup_command: "rm -rf assets/* && rm -f assets/asset-manifest.json"
# - name: Pushes test file
# uses: dmnemec/copy_file_to_another_repo_action@main
# env:
# API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
# with:
# source_file: 'build/*'
# destination_repo: 'noahbjohnson/noahbjohnson.github.io'
# destination_folder: 'test-dir'
# user_email: '[email protected]'
# user_name: 'noahbjohnson'
# commit_message: 'Release from Master'
# destination_branch: 'master'
#
# - name: Push directory to another repos
# uses: vinayb21/[email protected]
# env:
# API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
# with:
# source-directory: 'build'
# destination-github-username: 'noahbjohnson'
# destination-repository-name: 'noahbjohnson.github.io'
# user-email: '[email protected]'