File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4141 environment : production
4242
4343 steps :
44- - name : Checkout code
45- uses : actions/checkout@v4
46- with :
47- ref : release
48-
49- - name : Setup Node.js
50- uses : actions/setup-node@v4
51- with :
52- node-version : ${{ env.NODE_VERSION }}
53- cache : ' yarn'
54-
55- - name : Install dependencies
56- run : yarn install --frozen-lockfile
57-
58- - name : Setup Docker Buildx
59- uses : docker/setup-buildx-action@v3
60-
6144 - name : Add VPS to known hosts
6245 run : |
6346 mkdir -p ~/.ssh
9881 sudo rm -rf /var/www/$APP_NAME/dist
9982 sudo mv dist /var/www/$APP_NAME/
10083
101- # Set proper ownership for nginx to serve files
102- sudo chown -R www-data:www-data /var/www/$APP_NAME/dist
84+ # Make the file globally readable
85+ sudo chmod -R a+rX /var/www/$APP_NAME/dist
10386
10487 # Check if nginx config has changed and update if needed
10588 if ! cmp -s nginx/nginx.conf /etc/nginx/sites-available/$NGINX_SITE_NAME.conf; then
11093 fi
11194
11295 # Cleanup
113- rm -rf dist
114- # docker system prune -f
96+ docker system prune -f
11597 EOF
98+
99+ rm -f ~/.ssh/deploy_key
You can’t perform that action at this time.
0 commit comments