-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,49 @@ jobs: | |
with: | ||
local-dir: ./dist/ | ||
server: tori.ee | ||
username: siim.tori.ee | ||
password: ${{ secrets.password }} | ||
protocol: ftps | ||
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 |