refactor: add ~/components/icons to auto imported components #1188
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
name: CI/CD | |
on: push | |
# Those variables required for the build to pass | |
# But they're not used when deployed as the build is run on the server | |
env: | |
CMS_URL: https://cms.tchoukball.ch | |
ST_CONTACT_EMAIL_RECIPIENT: developer@tchoukball.ch | |
jobs: | |
CI: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout π | |
uses: actions/checkout@master | |
- name: Setup node env π | |
uses: actions/setup-node@v3.7.0 | |
with: | |
node-version: 14 | |
check-latest: true | |
- name: Cache node_modules π¦ | |
uses: actions/cache@v3.3.1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies π¨π»βπ» | |
run: npm ci --prefer-offline --no-audit | |
- name: Run linter π | |
run: npm run lint | |
- name: Build π¨ | |
run: npm run build | |
Deploy-to-staging: | |
if: ${{ github.ref == 'refs/heads/main' }} | |
needs: CI | |
runs-on: ubuntu-latest | |
environment: | |
name: Staging | |
url: https://next.tchoukball.ch | |
steps: | |
- name: Deploy to staging π | |
uses: appleboy/ssh-action@v0.1.10 | |
with: | |
host: ${{secrets.SSH_HOST}} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
passphrase: ${{ secrets.SSH_PASSPHRASE }} | |
script: | | |
cd ~/sites/next.tchoukball.ch | |
git pull | |
source ~/.nvm/.profile | |
source ~/env_vars/website-staging.sh | |
nvm install | |
npm ci | |
npm run build | |
npm list -g pm2 || npm install -g pm2 | |
pm2 restart website-nuxt-staging | |
Deploy-to-production: | |
if: ${{ github.ref == 'refs/heads/main' }} | |
needs: CI | |
runs-on: ubuntu-latest | |
environment: | |
name: Production | |
url: https://tchoukball.ch | |
steps: | |
- name: Deploy to production π | |
uses: appleboy/ssh-action@v0.1.10 | |
with: | |
host: ${{secrets.SSH_HOST}} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
passphrase: ${{ secrets.SSH_PASSPHRASE }} | |
script: | | |
cd ~/sites/tchoukball.ch | |
git pull | |
source ~/.nvm/.profile | |
source ~/env_vars/website-prod.sh | |
nvm install | |
npm ci | |
npm run build | |
npm list -g pm2 || npm install -g pm2 | |
pm2 restart website-nuxt-prod |