ci: migrate from CircleCI to GithubActions #1
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: Build and Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 14 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14.x | |
cache: yarn | |
- name: Yarn Install | |
run: yarn install | |
- name: Build | |
run: yarn build | |
- name: Wait on tests | |
uses: lewagon/[email protected] | |
with: | |
ref: master | |
check-name: test | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
wait-interval: 10 | |
- name: Clean ftp | |
uses: StephanThierry/[email protected] | |
with: | |
host: ${{ secrets.FTP_SERVER }} | |
user: ${{ secrets.FTP_USERNAME }} | |
password: ${{ secrets.FTP_PASSWORD }} | |
workingDir: / | |
remoteFiles: "*.xml;facivon.ico;*.html;manifest.webmanifest;robots.txt" | |
remoteDirectories: "assets" | |
- name: Deploy on ftp | |
uses: SamKirkland/[email protected] | |
with: | |
server: ${{ secrets.FTP_SERVER }} | |
username: ${{ secrets.FTP_USERNAME }} | |
password: ${{ secrets.FTP_PASSWORD }} | |
local-dir: dist/ | |
server-dir: / |