Skip to content

Update years

Update years #16

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Deploy to leonekmi.fr
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2.1.5
- name: Cache node_modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install deps
run: yarn
- name: Build
run: yarn build
- uses: actions/upload-artifact@v2
with:
name: website-dist
path: dist/
deploy:
runs-on: ubuntu-latest
needs: [ build ]
steps:
- uses: actions/download-artifact@v2
with:
name: website-dist
- name: Deploy assets
uses: Pendect/action-rsyncer@v1.1.0
env:
DEPLOY_KEY: ${{secrets.SSH_KEY}}
with:
flags: '-zvr --delete'
ssh_options: '-p 2556'
options: '-O'
src: 'assets/'
dest: 'leonekmifr-deploy@leonekmi.fr:/var/www/leonekmi.fr/assets'
- name: Deploy index.html
uses: Pendect/action-rsyncer@v1.1.0
env:
DEPLOY_KEY: ${{secrets.SSH_KEY}}
with:
flags: '-z'
ssh_options: '-p 2556'
options: '-O'
src: 'index.html'
dest: 'leonekmifr-deploy@leonekmi.fr:/var/www/leonekmi.fr/index.html'