impress-2020/deploy/playbooks/deploy.yml

24 lines
777 B
YAML
Raw Normal View History

---
- name: Deploy impress-2020 from `main` on GitHub
hosts: webserver
tasks:
- name: Pull impress-2020 from `main` on GitHub
git:
repo: https://github.com/matchu/impress-2020.git
dest: /srv/impress-2020/latest-version
version: main
- name: Install dependencies with yarn
command:
chdir: /srv/impress-2020/latest-version
cmd: yarn install
register: result
changed_when: '"Already up-to-date." not in result.stdout'
- name: Copy our local .env secrets file to the server
copy:
src: ../../.env
dest: /srv/impress-2020/latest-version
- name: Run `yarn build` to build the production app
command:
chdir: /srv/impress-2020/latest-version
cmd: yarn build