Skip to content

Commit

Permalink
Changing hosting to aws s3
Browse files Browse the repository at this point in the history
  • Loading branch information
Michalzr committed Feb 5, 2024
1 parent e9e9899 commit 38a37a3
Showing 1 changed file with 21 additions and 35 deletions.
56 changes: 21 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,34 @@
name: CI
name: Deploy

on:
push:
branches:
- master

jobs:
pipeline:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: checkout
uses: actions/checkout@v3
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: npm i
- run: npm run build

- name: setup node
uses: actions/setup-node@v3
- name: Set AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
node-version: 16.13.x
cache: npm
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_ID }}
aws-region: eu-central-1

- name: install dependencies
run: npm i

- name: build
run: npm run build

- name: deploy
uses: SamKirkland/FTP-Deploy-Action@4.3.3
with:
server: michalzrubec.sk
username: michalzr.michalzrubec.sk
password: ${{ secrets.FTP_PASSWORD }}
server-dir: web/lightweightGltfLoader/
exclude: |
assets/**
.git*
.git*/**
node_modules/**
src/**
package-lock.json
package.json
README.md
tsconfig.json
concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: true
- name: Copy to S3
run: aws s3 sync . s3://lightweightgltfloader \
--exclude '.git*' \
--exclude '.git*/**' \
--exclude 'node_modules/**' \
--exclude 'src/**' \
--exclude 'package-lock.json' \
--exclude 'package.json' \
--exclude 'README.md' \
--exclude 'tsconfig.json'

0 comments on commit 38a37a3

Please sign in to comment.