Skip to content

clean up comment

clean up comment #122

Workflow file for this run

on: push
name: πŸš€ Deploy website
jobs:
staging:
name: πŸŽ‰ Staging
runs-on: ubuntu-latest
environment:
name: STAGING
url: https://uus.tori.ee/
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v3
- name: β˜• Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: '18'
- name: πŸ“ Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: πŸ”¨ Build Project
run: |
npm ci
npm run build:prod
- name: ✍️ Create .env file
run: |
echo '${{ secrets.RECAPTCHA }}' > ./dist/.env
echo '${{ vars.RECIPIENT }}' >> ./dist/.env
- name: πŸ“‚ Sync files
uses: SamKirkland/[email protected]
with:
local-dir: ./dist/
server: tori.ee
username: staging.tori.ee
password: ${{ secrets.PASSWORD }}
protocol: ftps
production:
name: 🍾 Production
runs-on: ubuntu-latest
environment:
name: PROD
url: https://tori.ee/
needs: [staging]
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v3
- name: β˜• Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: '18'
- name: πŸ“ Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: πŸ”¨ Build Project
run: |
npm ci
npm run build:prod
- name: ✍️ Create .env file
run: |
echo '${{ secrets.RECAPTCHA }}' > ./dist/.env
echo '${{ vars.RECIPIENT }}' >> ./dist/.env
- name: πŸ“‚ Sync files
uses: SamKirkland/[email protected]
with:
local-dir: ./dist/
server: tori.ee
username: production.tori.ee
password: ${{ secrets.PASSWORD }}
protocol: ftps