{"id":22173360,"url":"https://github.com/malcodeman/github-actions-recipes","last_synced_at":"2025-03-24T17:46:07.166Z","repository":{"id":88491336,"uuid":"460630929","full_name":"malcodeman/github-actions-recipes","owner":"malcodeman","description":"GitHub Actions snippets.","archived":false,"fork":false,"pushed_at":"2022-03-11T18:51:06.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-29T22:33:10.289Z","etag":null,"topics":["github-actions"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/malcodeman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-17T22:36:44.000Z","updated_at":"2022-02-17T22:52:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"ceddd972-8ed4-40f8-b019-12d35490e39c","html_url":"https://github.com/malcodeman/github-actions-recipes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malcodeman%2Fgithub-actions-recipes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malcodeman%2Fgithub-actions-recipes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malcodeman%2Fgithub-actions-recipes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malcodeman%2Fgithub-actions-recipes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/malcodeman","download_url":"https://codeload.github.com/malcodeman/github-actions-recipes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245320617,"owners_count":20596218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions"],"created_at":"2024-12-02T07:33:05.932Z","updated_at":"2025-03-24T17:46:07.140Z","avatar_url":"https://github.com/malcodeman.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Actions recipes\n\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/malcodeman/github-actions-recipes/blob/master/LICENSE)\n\nThese are some use cases and code snippets to get you started with GitHub Actions.\n\n## Recipes\n\n### Next.js Static HTML Export Surge deployment\n\n`\"build\": \"next build \u0026\u0026 next export\"`\n\n```yaml\nname: Deployment\n\non:\n  push:\n    branches: [main]\n  workflow_dispatch:\n\njobs:\n  deployment:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions/setup-node@v2\n        with:\n          node-version: \"14\"\n\n      - name: Install packages\n        run: npm install\n\n      - name: Build the app\n        run: npm run build\n\n      - name: Install Surge\n        run: npm install -g surge\n\n      - name: Deploy to surge\n        run: surge ./out APP_NAME.surge.sh --token ${{secrets.SURGE_TOKEN}}\n```\n\n### React.js Surge deployment\n\n200.html page is required for [client-side routing](https://surge.sh/help/adding-a-200-page-for-client-side-routing).\n\n```yaml\nname: Deployment\n\non:\n  push:\n    branches: [main]\n  workflow_dispatch:\n\njobs:\n  deployment:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions/setup-node@v2\n        with:\n          node-version: \"14\"\n\n      - name: Install packages\n        run: npm install\n\n      - name: Build the app\n        run: npm run build\n\n      - name: Rename index file\n        run: mv build/index.html build/200.html\n\n      - name: Install Surge\n        run: npm install -g surge\n\n      - name: Deploy to surge\n        run: surge ./build APP_NAME.surge.sh --token ${{secrets.SURGE_TOKEN}}\n```\n\n### Expo\n\n```yaml\nname: Deployment\n\non:\n  push:\n    branches: [main]\n  workflow_dispatch:\n\njobs:\n  deployment:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions/setup-node@v2\n        with:\n          node-version: \"14\"\n\n      - name: Install packages\n        run: npm install\n\n      - name: Install Expo CLI\n        run: npm install -g expo-cli\n\n      - name: Deploy to Expo\n        env:\n          EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}\n        run: expo publish --non-interactive\n```\n\n### Cron job\n\n```yaml\nname: Cron\n\non:\n  schedule:\n    - cron: \"0 9 * * *\"\n  workflow_dispatch:\n\njobs:\n  cron:\n    runs-on: ubuntu-latest\n    env:\n      NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}\n      NOTION_DATABASE_ID: ${{ secrets.NOTION_DATABASE_ID }}\n      SLACK_SIGNING_SECRET: ${{ secrets.SLACK_SIGNING_SECRET }}\n      SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}\n      SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions/setup-node@v2\n        with:\n          node-version: \"14\"\n\n      - name: Install packages\n        run: npm install\n\n      - name: Start the app\n        run: npm run start\n```\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalcodeman%2Fgithub-actions-recipes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalcodeman%2Fgithub-actions-recipes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalcodeman%2Fgithub-actions-recipes/lists"}