|
1 | 1 | name: Deploy Eleventy on staging via rsync |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: [staging] |
6 | | - pull_request: |
7 | | - branches: [staging] |
| 4 | + push: |
| 5 | + branches: [staging] |
| 6 | + pull_request: |
| 7 | + branches: [staging] |
8 | 8 |
|
9 | 9 | jobs: |
10 | | - build: |
11 | | - runs-on: ubuntu-latest |
12 | | - steps: |
13 | | - # Check-out the repository under $GITHUB_WORKSPACE. |
14 | | - - uses: actions/checkout@master |
| 10 | + build: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + steps: |
| 13 | + # Check-out the repository under $GITHUB_WORKSPACE. |
| 14 | + - uses: actions/checkout@master |
15 | 15 |
|
16 | | - - name: Install dependencies. |
17 | | - run: npm ci |
| 16 | + - name: Install dependencies. |
| 17 | + run: npm ci |
18 | 18 |
|
19 | | - # Build the website with Eleventy. |
20 | | - - name: Build Eleventy. |
21 | | - run: npm run build |
| 19 | + - name: Lint with fix. |
| 20 | + run: npx eslint --fix |
22 | 21 |
|
23 | | - # Rsync files via SSH. |
24 | | - - name: Sync files with server. |
25 | | - uses: burnett01/rsync-deployments@master |
26 | | - with: |
27 | | - switches: -rlD --delete --exclude='.htaccess' |
28 | | - path: _site/ |
29 | | - remote_path: ${{ secrets.REMOTE_PATH_STAGING }} |
30 | | - remote_host: ${{ secrets.REMOTE_HOST }} |
31 | | - remote_port: ${{ secrets.REMOTE_PORT }} |
32 | | - remote_user: ${{ secrets.REMOTE_USER }} |
33 | | - remote_key: ${{ secrets.REMOTE_PRIVATE_KEY }} |
34 | | - remote_key_pass: ${{ secrets.REMOTE_PRIVATE_KEY_PASS }} |
| 22 | + # Build the website with Eleventy. |
| 23 | + - name: Build Eleventy. |
| 24 | + run: npm run build |
| 25 | + |
| 26 | + # Rsync files via SSH. |
| 27 | + - name: Sync files with server. |
| 28 | + uses: burnett01/rsync-deployments@master |
| 29 | + with: |
| 30 | + switches: -rlD --delete --exclude='.htaccess' |
| 31 | + path: _site/ |
| 32 | + remote_path: ${{ secrets.REMOTE_PATH_STAGING }} |
| 33 | + remote_host: ${{ secrets.REMOTE_HOST }} |
| 34 | + remote_port: ${{ secrets.REMOTE_PORT }} |
| 35 | + remote_user: ${{ secrets.REMOTE_USER }} |
| 36 | + remote_key: ${{ secrets.REMOTE_PRIVATE_KEY }} |
| 37 | + remote_key_pass: ${{ secrets.REMOTE_PRIVATE_KEY_PASS }} |
0 commit comments