Skip to content

Commit

Permalink
Fixed workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeniy-kolmak committed Apr 2, 2024
1 parent 497199c commit 343475e
Showing 1 changed file with 25 additions and 26 deletions.
51 changes: 25 additions & 26 deletions .github/workflows/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
name: Deploy
on:
name: Deployment Application
on:
push:
branches:
- main
jobs:
deployment:
runs-on: ubuntu-latest
steps:
- name: Get repository code
uses: actions/checkout@v3
- name: Setup key
run: |
set -eu
mkdir "$HOME/.ssh"
echo "${{secrets.key}}" > "$HOME/.ssh/key"
chmod 600 "$HOME/.ssh/key"
- name: Installation of dependencies
run: npm ci
- name: Creating an environment file
run: echo "REACT_APP_TOKEN = ${{secrets.token}}" >> .env
- name: Build app
run: npm run build
- name: Creating an htaccess file
run: cd build && echo "${{secrets.htaccess}}" >> .htaccess
- name: Deployment app
run: cd build && rsync -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no" --archive --compress --delete . [email protected]:/var/www/u1916380/data/www/pincow.xyz
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Get repository code
uses: actions/checkout@v4
- name: Cache npm dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ hashFiles('**/package-lock.json') }}
- name: Installation of dependencies
run: npm ci
- name: Creating an environment file
run: echo "REACT_APP_TOKEN = ${{secrets.token}}" >> .env
- name: Building App for prodaction
run: npm run build:prod
- name: Deployment App
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{secrets.GITHUB_TOKEN}}
publish_dir: ./build

0 comments on commit 343475e

Please sign in to comment.