gh action test #32
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
on: | |
push: | |
branches: main | |
name: PREVIEW Deploy website on push | |
jobs: | |
web-deploy: | |
name: Deploy | |
runs-on: [ubuntu-latest] | |
steps: | |
- name: Get latest code | |
uses: actions/checkout@v4 | |
- name: Install composer dependencies | |
uses: php-actions/composer@v6 | |
with: | |
php_version: "8.2" | |
php_extensions: gd ctype curl mbstring zip | |
version: 2.x | |
- name: Install npm dependencies | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- run: | | |
npm ci | |
npm run build | |
- name: Sync files | |
uses: SamKirkland/[email protected] | |
with: | |
server: ${{ secrets.previewcostructserverurl }} | |
username: ${{ secrets.previewcostructusername }} | |
password: ${{ secrets.previewcostructpassword }} | |
server-dir: ${{ secrets.previewcostructserverdirectory }} | |
exclude: | | |
.htaccess | |
**/.git* | |
**/.git/** | |
**/.github/** | |
**/src/** | |
**/node_modules/** | |
**/content/** | |
- name: SSH into the server | |
run: | | |
ssh ${{ secrets.previewcostructusername }}@${{ secrets.previewcostructserverurl }} | |
ls -la |