uses: Specifies an action to run. Actions are reusable units of code. You can find thousands on the GitHub Marketplace.
run: Executes command-line programs using the runner’s shell.
steps: # Use a pre-built action from the marketplace-uses: actions/checkout@v4 # Run a command-name: Install dependenciesrun: npm install # Run another command-name: Run testsrun: npm test
Use Cases
What can you automate with GitHub Actions?
Continuous Integration (CI): Automatically build and test your code on every push.
Continuous Deployment (CD): Automatically deploy your application to the cloud.
Issue Triage: Label and comment on new issues automatically.
Notifications: Send a message to Slack or Discord when a build fails.
Scheduled Tasks: Run a script to check for broken links on your site every night.
Pre-built Actions
GitHub Marketplace provides a collection of pre-built actions for many tasks