File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ # GitHub Action to automate React Web build
2
+
3
+ Automate your ReactJS web build by getting help from GitHub Actions.
4
+
5
+ ## GitHub Action
6
+
7
+ Config file: https://github.com/BaseMax/ReactGlobalOnlineSummit-Actions/blob/main/.github/workflows/test1.yml
8
+
9
+ ```
10
+ on: push
11
+ name: 🚀 Deploy website on push
12
+ jobs:
13
+ web-deploy:
14
+ name: 🎉 Deploy
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - name: 🚚 Get latest code
18
+ uses: actions/checkout@v3
19
+
20
+ - name: Use Node.js 16
21
+ uses: actions/setup-node@v3
22
+ with:
23
+ node-version: '16'
24
+
25
+ - name: 🔨 Build Project
26
+ run: |
27
+ npm install
28
+ npm run build
29
+
30
+ - name: List output files
31
+ run: find build/ -print
32
+
33
+ - name: FTP Deployer
34
+ uses: sand4rt/ftp-deployer@v1.4
35
+ with:
36
+ sftp: true
37
+ host: asrez.com
38
+ port: 22
39
+ username: asrez
40
+ password: ${{ secrets.FTP_PASSWORD }}
41
+ remote_folder: '/home/asrez/public_html/test-react.maxbase.org/'
42
+ local_folder: 'build/'
43
+ cleanup: false
44
+ include: '[ "*", "**/*" ]'
45
+ exclude: '["node_modules/**", ".github/**", ".git/**", "*.env"]'
46
+ pasive: true
47
+ ```
48
+
49
+ Copyright 2022, Max Base
You can’t perform that action at this time.
0 commit comments