rdme
Version:
ReadMe's official CLI and GitHub Action.
36 lines (32 loc) • 1.32 kB
JavaScript
/**
* The base GitHub Actions workflow file, which is used for generating the YAML file.
*
* The reason this is expressed as a JavaScript string as opposed to a YAML file is because
* TypeScript doesn't have a great way to copy over non-TS files to the `dist/`.
* Plus, this way we can write internal comments like this!
*
* @see {@link https://github.com/microsoft/TypeScript/issues/30835}
* @see {@link https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions}
*/
const yamlBase = `# This GitHub Actions workflow was auto-generated by the \`rdme\` cli on {{timestamp}}
# You can view our full documentation here: https://docs.readme.com/docs/rdme
name: ReadMe GitHub Action 🦉
on:
push:
branches:
# This workflow will run every time you push code to the following branch: \`{{branch}}\`
# Check out GitHub's docs for more info on configuring this:
# https://docs.github.com/actions/using-workflows/events-that-trigger-workflows
- {{branch}}
jobs:
rdme-{{cleanCommand}}:
runs-on: ubuntu-latest
steps:
- name: Check out repo 📚
uses: actions/checkout@v4
- name: Run \`{{command}}\` command 🚀
uses: readmeio/rdme@{{rdmeVersion}}
with:
rdme: {{commandString}}
`;
export default yamlBase;